// Copyright (c) Microsoft Corporation
// All rights reserved

namespace Microsoft.Windows.Controls.Specialized.TextExtensions
{
    using System;

    using Microsoft.Windows.Controls.Specialized.TextModel;

    /// <summary>
    /// Describes the Classification Changed event.
    /// </summary>
    public class ClassificationChangedEventArgs : EventArgs
    {
        TextSpan changeSpan;

        /// <summary>
        /// Create a ClassificationChangedEventArgs object.
        /// </summary>
        /// <param name="changeSpan">
        /// The span of the classification that changed.
        /// </param>
        /// <exception cref="ArgumentNullException"><paramref name="changeSpan"/> is null.</exception>
        public ClassificationChangedEventArgs(TextSpan changeSpan)
        {
            if (changeSpan == null)
                throw new ArgumentNullException("changeSpan");

            this.changeSpan = changeSpan;
        }

        /// <summary>
        /// The span of the classification that changed.
        /// </summary>
        public TextSpan ChangeSpan
        {
            get { return this.changeSpan; }
        }
    }
}